package com.eatme.web.app.coupon.common.vo;

import java.util.List;

/**
 * 结算信息对象定义
 * 包含:
 * 1.userId
 * 2.商品信息(列表)
 * 3.优惠券列表
 * 4.结算结果金额
 */
public class SettlementInfo {

    /** 用户 id */
    private Long userId;

    /** 商品信息 */
    private List<GoodsInfo> goodsInfos;

    /** 优惠券列表 */
    private List<CouponAndTemplateInfo> couponAndTemplateInfos;

    /** 是否使结算生效,即核销 */
    private Boolean employ;

    /** 结果结算金额 */
    private Integer cost;

    /**
     * 优惠券和模板信息
     * */
    public static class CouponAndTemplateInfo {
        /** Coupon 的主键 */
        private Integer id;

        /** 优惠券对应的模板对象 */
        private CouponTemplateSDK template;

        public CouponAndTemplateInfo() {
        }

        public CouponAndTemplateInfo(Integer id, CouponTemplateSDK template) {
            this.id = id;
            this.template = template;
        }

        public Integer getId() {
            return id;
        }

        public void setId(Integer id) {
            this.id = id;
        }

        public CouponTemplateSDK getTemplate() {
            return template;
        }

        public void setTemplate(CouponTemplateSDK template) {
            this.template = template;
        }
    }


    public SettlementInfo() {
    }

    public SettlementInfo(Long userId, List<GoodsInfo> goodsInfos, List<CouponAndTemplateInfo> couponAndTemplateInfos, Boolean employ, Integer cost) {
        this.userId = userId;
        this.goodsInfos = goodsInfos;
        this.couponAndTemplateInfos = couponAndTemplateInfos;
        this.employ = employ;
        this.cost = cost;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public List<GoodsInfo> getGoodsInfos() {
        return goodsInfos;
    }

    public void setGoodsInfos(List<GoodsInfo> goodsInfos) {
        this.goodsInfos = goodsInfos;
    }

    public List<CouponAndTemplateInfo> getCouponAndTemplateInfos() {
        return couponAndTemplateInfos;
    }

    public void setCouponAndTemplateInfos(List<CouponAndTemplateInfo> couponAndTemplateInfos) {
        this.couponAndTemplateInfos = couponAndTemplateInfos;
    }

    public Boolean getEmploy() {
        return employ;
    }

    public void setEmploy(Boolean employ) {
        this.employ = employ;
    }

    public Integer getCost() {
        return cost;
    }

    public void setCost(Integer cost) {
        this.cost = cost;
    }
}
